﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;

namespace Common
{
    public class LienHe
    {
        public int iLienHe_ID { get; set; }
        public string sHoTen { get; set; }
        public string sDienThoai { get; set; }
        public string sEmail { get; set; }
        public string sNoiDung { get; set; }
        public LienHe()
        {

        }

        public LienHe(SqlDataReader reader)
        {
            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) this.iLienHe_ID = Convert.ToInt32(reader["iLienHe_ID"]);
                if (!reader.IsDBNull(1)) this.sHoTen = reader["sHoTen"].ToString();
                if (!reader.IsDBNull(2)) this.sDienThoai = reader["sDienThoai"].ToString();
                if (!reader.IsDBNull(3)) this.sEmail = reader["sEmail"].ToString();
                if (!reader.IsDBNull(4)) this.sNoiDung = reader["sNoiDung"].ToString();
            }
            reader.Close();
            reader.Dispose();
        }
    }
}
